﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;


namespace GlobalObjects
{

    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class User
    {
        //private string password_;

        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Title { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String FirstName { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String LastName { get; set; }
        [DataMember(Name="Organization",IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Organisation { get; set; }
        [DataMember(Name="EmailAddress",IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Email { get; set; }
      
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Country { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Purpose { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Username { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Password { get; set; }   
        [DataMember(IsRequired = false,EmitDefaultValue=false), Newtonsoft.Json.JsonProperty]
        public int Id { get; set; }
     
    }

    [DataContract(Name = "UserDetails")]
    public class UserDetails
    {
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Title { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String FirstName { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String LastName { get; set; }
        [DataMember(Name = "Organization", IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Organization { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String EmailAddress { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Country { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Purpose { get; set; }
        [DataMember(IsRequired = false), Newtonsoft.Json.JsonProperty]
        public String Username { get; set; }
        [DataMember(IsRequired = true), Newtonsoft.Json.JsonProperty]
        public int Id { get; set; }
     
    }
    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class UserLoginContract
    {
        [DataMember(IsRequired = true), Newtonsoft.Json.JsonProperty]
        public String Username { get; set; }
        [DataMember(IsRequired = true), Newtonsoft.Json.JsonProperty]
        public String Password { get; set; }

    }

    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class UserDeleteContract
    {
        [DataMember(IsRequired=true), Newtonsoft.Json.JsonProperty]
        public String Password { get; set; }
        [DataMember(IsRequired = true), Newtonsoft.Json.JsonProperty]
        public int Id { get; set; }

    }

}
